package net.dfx.iot_download_tool.impl;

import net.dfx.iot_download_tool.conf.ReadConfFromDisk;
import net.dfx.iot_download_tool.itf.IMutiExec;
import net.dfx.iot_download_tool.itf.IRequestData;
import net.dfx.iot_download_tool.itf.IUserEnter;
import net.dfx.iot_download_tool.utils.ApiKeyUtil;
import net.dfx.iot_download_tool.vo.ApikeyVO;
import net.dfx.iot_download_tool.vo.ConfVO;
import net.dfx.iot_download_tool.vo.UserEnterVO;

public class RequestDataImpl implements IRequestData {
	
	protected IRequestData reqData;

	public RequestDataImpl(IRequestData reqData) {
		super();
		this.reqData = reqData;
	}

	@Override
	public void getAllData() {
		// 默认情况下，获取数据梳理后保存到SQLite3数据库中
		// 1.测试网络连通性，获取ApiKey
		ApiKeyUtil aku = new ApiKeyUtil();
		ApikeyVO apiKey = aku.getApiKey();
		// 2.提示并获取用户输入
		IUserEnter iue = new UserEnterImpl();
		UserEnterVO userEnter = iue.getAllUserEnter();
		// 3.读取配置
		ReadConfFromDisk rcfd = new ReadConfFromDisk();
		ConfVO confVO = rcfd.getConf();
		
		IMutiExec ime = new MutiExecImpl(apiKey, userEnter, confVO);
		// 4.其余导出的包装功能交给装饰器实现
	}

}